<?PHP

 // MinBS - Minimalist Blogging System
 // Developed by Juliano "tibone" Flores
 // http://code.google.com/p/minbs

require_once('required.php');
session_start();
if(!$_SESSION['minbs']=="logged"){
header("location:index.php");
}

$query_admin = "SELECT * FROM minbs_blog ORDER by date DESC";
$admin_results = mysql_query($query_admin, $connection);


?>


<html>
<head>
<title>MinBS - Minimalist Blogging System</title>
</head>

<body>
<center>
<table height="100%" width="80%" cellspacing="0" border="0" cellpadding="0">
<tr>
 <td colspan="2">
  <center><font face="Verdana" size="3" color="#AAAAAA">MinBS - Minimalist Blogging System - Main Page</font></center>
 </td>
</tr>
<tr>
 <td colspan="2">
  <center><font face="Verdana" size="1" color="#AAAAAA">Logged in as <?PHP echo $_SESSION['poster']; ?> :: <a href="logout.php">Logout</a> :: <a href="../index.php">Back to Blog</a></center>
  </font>
 </td>
</tr>
<tr>
 <td width="50%" valign="top">
 <font face="Verdana" Size="4" color="#AAAAAA">POSTS</font><br>
 <a href="post_add.php">Add a new post</a><br>
 <br>
 <?PHP while($posts = mysql_fetch_array($admin_results)) { ?>
 - <a href="post_edit.php?id=<?PHP echo $posts['id']; ?>"><?PHP echo $posts['title']; ?></a> :: <a href="post_edit.php?id=<?PHP echo $posts['id']; ?>">Edit</a> :: <a href="post_del.php?id=<?PHP echo $posts['id']; ?>">Delete</a>
 <br>
 <?PHP } ?>
 </td>

 <td width="50%" valign="top">
 <font face="Verdana" Size="4" color="#AAAAAA">CATEGORIES</font><br>
 <a href="cat_add.php">Add a new post category</a><br>
 <br>
 <?PHP while($cats = mysql_fetch_array($categories)) { ?>
 - <?PHP echo $cats['name']; ?> :: <a href="cat_del.php?id=<?PHP echo $cats['id']; ?>">Delete</a>
 <br>
 <?PHP } ?>

 <br>
 <br>
 <br>
 <font face="Verdana" Size="4" color="#AAAAAA">Settings</font><br>
 <a href="blog_settings.php">Blog Settings</a><br>
 </td>
</tr>
<tr>
 <td colspan="2">
 <center><font face="Verdana" size="1" color="#BBBBBB">MinBS - <?PHP echo $minbs_version; ?></font></center>
 </td>
</tr>
</table>
</center>
</body>
</html>

 
